Definition (class 𝐍𝐏\mathbf{NP})

A language L⊆{0,1}∗L \subseteq \{0,1\}^* is in 𝐍𝐏\mathbf{NP} if there exists a polynomial p:ℕ→ℕp : \mathbb{N} \to \mathbb{N} and a polynomial-time TM MM (called the verifier for LL) such that for every x∈{0,1}∗x \in \{0,1\}^*,

x∈L⟺∃u∈{0,1}p(|x|) s.t.M(x,u)=1x \in L \iff \exists u \in \{0,1\}^{p(\lvert x \rvert)} \text{ s.t.} M(x,u)=1

If x∈Lx \in L and u∈{0,1}p(|x|)u \in \{0,1\}^{p(\lvert x \rvert)} satisfy M(x,u)=1M(x,u) = 1, then we can call uu a certificate for xx (with respect to language LL, machine MM). Also known in some texts as witness.

In other words, 𝐍𝐏\mathbf{NP} is the set of all languages LL such that there exists a polynomial-time algorithm AA with x∈L⟺∃y s.t. A(x,y)=1x \in L \iff \exists y \text{ s.t. } A(x,y) = 1.

(there is a polynomial-time algorithm to verify "yes" instances given the appropriate certificate)

Definition (NP puzzle)

An NP puzzle consists of a poly-time computable relation R(y,x)R(y, x). Think of yy as a puzzle or statement, and xx as a solution or witness. The relation RR tests if xx is a good solution for the problem yy and outputs 11 (accept) or 00 (reject).

Notes

  • 𝐏⊆𝐍𝐏\mathbf{P} \subseteq \mathbf{NP} as it is possible that p(|x|)p(\lvert x \rvert) is 00 (i.e. uu can be empty string)
  • In describing PCP (as every L∈𝐍𝐏L \in \mathbf{NP} has a 𝐏𝐂𝐏\mathbf{PCP}), it is useful to describe 𝐍𝐏\mathbf{NP} as follows: the language L∈𝐍𝐏L \in \mathbf{NP} iff there is polynomial-time deterministic verifier and arbitrarily powerful prover PP such that
    • completeness: ∀x∈L\forall x \in L, PP can write proof of length poly⁡(|x|)\operatorname{poly}(\lvert x \rvert) that VV accepts
    • soundness: ∀x∉L\forall x \notin L, no matter what poly⁡(|x|)\operatorname{poly}(\lvert x \rvert)-length proof PP writes, VV rejects.
  • Σ1P=𝐍𝐏\Sigma_1^P = \mathbf{NP} (see: polynomial hierarchy)

Theorem (in terms of NTIME)

𝐍𝐏=∪c∈ℕ𝐍𝐓𝐈𝐌𝐄(nc)\mathbf{NP} = \cup_{c \in \mathbb{N}} \mathbf{NTIME}(n^c)
(see NTIME)

see also


References

  1. S. Arora, B. Barak. Computational Complexity: A Modern Approach, Cambridge University Press, 2009, p. 39.
  2. https://www.cs.williams.edu/~shikha/teaching/spring20/cs256/lectures/Lecture22.pdf
  3. https://baike.baidu.com/item/NP完全问题/4934286
  4. https://webdocs.cs.ualberta.ca/~zacharyf/courses/complexity_2019/notes/complexity-w19-lec03.pdf
  5. https://math.stackexchange.com/questions/2334429/what-is-the-difference-between-np-and-conp
  6. https://courses.cs.washington.edu/courses/cse533/05au/pcp-theorem.pdf
  7. https://www.khoury.northeastern.edu/home/wichs/class/crypto-fall17/lecture7.pdf